﻿<Window x:Class="DiagramDesigner.Window1"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:s="clr-namespace:DiagramDesigner"
        xmlns:c="clr-namespace:DiagramDesigner.Controls"
        WindowStartupLocation="CenterScreen"
        SnapsToDevicePixels="True"
        Title="Diagram Designer"        
        Height="750" Width="950">
  <Window.Resources>
    <ResourceDictionary>
      <ResourceDictionary.MergedDictionaries>
        <ResourceDictionary Source="Resources/DesignerItem.xaml"/>
        <ResourceDictionary Source="Resources/ToolboxItem.xaml"/>
        <ResourceDictionary Source="Resources/Toolbox.xaml"/>
        <ResourceDictionary Source="Resources/Connection.xaml"/>
        <ResourceDictionary Source="Resources/Stencils/FlowChartStencils.xaml"/>
        <ResourceDictionary Source="Resources/Stencils/ShapeStencils.xaml"/>
        <ResourceDictionary Source="Resources/Stencils/SymbolStencils.xaml"/>
      </ResourceDictionary.MergedDictionaries>
    </ResourceDictionary>
  </Window.Resources>
  <Grid>
    <Grid Margin="10">
      <Grid.ColumnDefinitions>
        <ColumnDefinition Width="265"/>
        <ColumnDefinition/>
      </Grid.ColumnDefinitions>
      <!-- Toolbox -->
      <StackPanel Grid.Column="0" Margin="0,0,5,0">
        <Expander Header="Symbols" Content="{StaticResource SymbolStencils}" IsExpanded="True" />
        <Expander Header="Flow Chart" Content="{StaticResource FlowChartStencils}" IsExpanded="True"/>        
        <Expander Header="Shapes" Content="{StaticResource ShapeStencils}" IsExpanded="False" />
      </StackPanel>
      <!-- GridSplitter -->
      <GridSplitter Focusable="False" Width="2" Background="{StaticResource LightBorderBrush}"
                    VerticalAlignment="Stretch" HorizontalAlignment="Right"/>
      <!-- Designer -->
      <GroupBox Header="Designer" Grid.Column="1" Margin="3,0,0,0" Background="Transparent">
        <ScrollViewer HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto">
          <s:DesignerCanvas Background="Transparent" Margin="10"/>
        </ScrollViewer>
      </GroupBox>
    </Grid>
  </Grid>
</Window>
